|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectj3deditor.bin.hierarchy.J3DeGeometry
j3deditor.bin.hierarchy.J3DeGeometryArray
public class J3DeGeometryArray
Manages Java 3D javax.media.j3d.GeometryArray
object.
GeometryArray| Constructor Summary | |
|---|---|
J3DeGeometryArray(javax.media.j3d.GeometryArray geom)
Creates an instance of J3DeGeometryArray. |
|
| Method Summary | |
|---|---|
J3DeGeometryArray |
changeGeometryType(int vertexFormat)
Creates new GeometryArray with the specified
vertex format and vertex data from this J3DeGeometryArray. |
protected void |
changeValidVCount(int newValue)
Changes the amount of valid vertices (and restructures the array of vertices (Vertex[])). |
static J3DeGeometryArray |
createNewGeometryArray(int type,
int vertexCount,
int vertexFormat)
Creates new GeometryArray with the specified
properties and sets its valid vertx count to 0. |
J3DeGeometryArray |
createSimilarGeometryArray(int vertexCount,
Vertex[] vertices)
Creates and returns new J3DeGeometryArray
which has same properties. |
protected void |
deleteVertices(Vertex[] vertices)
Deletes specified vertices. |
protected float[] |
getColor(int index)
Returns the color of the specified vertex. |
int |
getColorType()
Returns the type of vertex colors. |
protected float[] |
getNormal(int index)
Returns the vertex normal of the specified vertex. |
int |
getTexCoordSetCount()
Returns the amount of texture coordinate sets. |
int |
getTexCoordType()
Returns the type of texture coordinates. |
protected float[] |
getTextureCoordinates(int index,
int[] axes,
int texCoordSet)
Returns texture coordinates of the specified vertex. |
protected float[] |
getVertexCoordinates(int index,
int[] axes)
Returns the coordinates of the specified vertex. |
protected int |
getVertexCount()
Returns the amount of all vertices. |
int |
getVertexGroupMode()
Returns vertex group mode. |
int |
getVertexMode()
Returns vertex mode. |
protected Vertex[] |
getVertices()
Returns all valid vertices. |
boolean |
hasColor()
Returns true if vertex colors is enabled, otherwise false. |
boolean |
hasNormals()
Returns true if vertex normals is enabled, otherwise false. |
static void |
setCapabilities(javax.media.j3d.GeometryArray geom)
Sets neccessary capability bits. |
protected void |
setColor(int index,
float[] color)
Sets the color of the specified vertex. |
protected void |
setNormal(int index,
float[] coordinates)
Sets the vertex normal of the specified vertex. |
protected void |
setTextureCoordinates(int index,
float[] coordinates,
int[] axes,
int texCoordSet)
Sets texture coordinates of the specified vertex. |
protected void |
setVertexCoordinates(int index,
float[] coordinates,
int[] axes)
Sets the coordinates of the specified vertex. |
java.lang.String |
toString()
Returns the String representation of this J3DeGeometryArray. |
| Methods inherited from class j3deditor.bin.hierarchy.J3DeGeometry |
|---|
getGeometry, setCapabilities |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public J3DeGeometryArray(javax.media.j3d.GeometryArray geom)
J3DeGeometryArray.
geom - GeometryArray which data this
J3DeGeometryArray manages| Method Detail |
|---|
public static void setCapabilities(javax.media.j3d.GeometryArray geom)
geom - GeometryArray which capability
bits will be set.GeometryArrayprotected Vertex[] getVertices()
protected void deleteVertices(Vertex[] vertices)
vertices - vertices that will be deletedprotected void changeValidVCount(int newValue)
newValue - new amount of valid verticesprotected int getVertexCount()
GeometryArray.getVertexCount()
protected float[] getVertexCoordinates(int index,
int[] axes)
index - index of the vertexaxes - requested coordinate axes.
protected void setVertexCoordinates(int index,
float[] coordinates,
int[] axes)
index - index of the vertexcoordinates - new coordinates (only those axes set by axes)axes - coordinate axes which will be updated.
protected float[] getTextureCoordinates(int index,
int[] axes,
int texCoordSet)
index - index of the vertexaxes - requested texture coordinate axes.texCoordSet - index of the texture coordinate set
protected void setTextureCoordinates(int index,
float[] coordinates,
int[] axes,
int texCoordSet)
index - index of the vertexcoordinates - new coordinates (only those axes set by axes).axes - texture coordinate axes which will be updated.texCoordSet - index of the texture coordinate setprotected float[] getNormal(int index)
index - index of the vertex
protected void setNormal(int index,
float[] coordinates)
index - index of the vertexcoordinates - normal vector values (X, Y and Z)protected float[] getColor(int index)
index - index of the vertex
protected void setColor(int index,
float[] color)
index - index of the vertexcolor - new color (COLOR_3 or COLOR_4
according to the type of GeometryArray)
public static J3DeGeometryArray createNewGeometryArray(int type,
int vertexCount,
int vertexFormat)
GeometryArray with the specified
properties and sets its valid vertx count to 0.
type - 1 - PointArrayLineArrayTriangleArrayQuadArrayvertexCount - number of verticesvertexFormat - a mask indicating which components are present in each vertex,
see javax.media.j3d.GeometryArray flags
J3DeGeometryArray which contains
newly created GeometryArrayGeometryArray
public J3DeGeometryArray createSimilarGeometryArray(int vertexCount,
Vertex[] vertices)
J3DeGeometryArray
which has same properties.
vertexCount - number of verticesvertices - vertices which will be copied to new J3DeGeometryArray
(valid vertices)
J3DeGeometryArray
which has same propertiespublic J3DeGeometryArray changeGeometryType(int vertexFormat)
GeometryArray with the specified
vertex format and vertex data from this J3DeGeometryArray.
vertexFormat - a mask indicating which components are present in each vertex,
see javax.media.j3d.GeometryArray flags
J3DeGeometryArray which contains
newly created GeometryArrayGeometryArraypublic int getVertexMode()
GeometryArrayBY_REFERENCE GeometryArrayINTERLEAVED GeometryArray
public int getVertexGroupMode()
PointArrayLineArrayTriangleArrayQuadArray
public int getTexCoordType()
TEXTURE_COORDINATE_2TEXTURE_COORDINATE_3TEXTURE_COORDINATE_4
public int getTexCoordSetCount()
public boolean hasNormals()
public boolean hasColor()
public int getColorType()
COLOR_3COLOR_4
public java.lang.String toString()
J3DeGeometryArray.
toString in class java.lang.ObjectJ3DeGeometryArray
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||